home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / sound / mrmpeg / next.rexx < prev    next >
OS/2 REXX Batch file  |  1997-12-01  |  1KB  |  36 lines

  1. /* Next.rexx */
  2.  
  3. options results; address MrMPEG
  4.  
  5. MUIA_Selected        = 0x8042654b;    MUIA_List_Active    = 0x8042391c
  6. MUIA_List_Entries    = 0x80421654;    MUIV_List_Active_Down    = -5
  7. MUIV_List_Active_Top    = -2
  8.  
  9. list ID SLIST ATTRS MUIA_List_Entries; max = result
  10. list ID SLIST ATTRS MUIA_List_Active; current = result
  11. check ID RAND; rand = result
  12. if rand = 1 then do
  13.   flag = 0
  14.   do while flag = 0
  15.   temp = random(0, max - 1, time('S'))
  16.     if temp ~= current then do
  17.       list ID SLIST ATTRS MUIA_List_Active temp
  18.       flag = 1
  19.     end
  20.   end /* of while flag */
  21. end /* of if rand */
  22. else if current ~= max - 1 then list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Down
  23. else list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Top
  24. list ID SLIST ATTRS MUIA_List_Active; temp_active = result
  25. setvar current_time '00:00'
  26. setvar active temp_active
  27. text ID ACTIV LABEL "\033b\033r"temp_active + 1
  28. call GetInfo()
  29. check ID PLAY
  30. if result = 1 then do
  31.   call Stop()
  32.   delay(20)
  33.   check ID PLAY ATTRS MUIA_Selected 1
  34. end
  35. return
  36.